package com.magenta.maxoptra.gis;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Дима
 * Date: 17.12.12
 * Time: 0:19
 * To change this template use File | Settings | File Templates.
 */
public enum VehicleType {

    Default(0, "No specific vehicle type has been set. When applied to a Route, a VehicleType of Auto will actually be used."),
    Auto(1, "Automobile"),
    Bus(2, "Bus"),
    Taxi(3, "Taxi"),
    CarPool(4, "Car-pooling vehicle"),
    Pedestrian(5, "Pedestrian who walks"),
    Emergency(6, "Emergency vehicle"),
    StraightTruck(7, "Straight truck (as opposed to a tractor/trailer combination)"),
    TractorSemiTrailer(8, "A tractor with a single trailer"),
    StandardDouble(9, "A truck with two trailers"),
    IntermediateDouble(10, "An intermediate-length truck with two trailers"),
    LongDouble(11, "A long truck with two trailers"),
    Triple(12, "A truck with three trailers"),
    OtherLCV(13, "Other light commercial vehicle"),
    Unknown(14, "No information about this vehicle is available"),
    Truck(15, "Truck, combination of the different truck types"),
    All(16, "All vehicles"),
    AllButEmergency(17, "Any vehicle, except for an emergency vehicle");

    int code;
    String description;

    VehicleType(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    static List<String> asStringList() {
        List<String> list = new ArrayList<String>();
        for (VehicleType vehicleType : VehicleType.values()) {
            list.add(vehicleType.name());
        }
        return list;
    }
}
